'use strict';

module.exports = app => {

  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const ObjectId = Schema.ObjectId;

  const ExpertEvaluateSchema = new Schema({
    order_id: { type: ObjectId },
    expert_id: { type: ObjectId },
    user_id: { type: ObjectId },
    score: { type: Number, default: 5 },
    tags: { type: Array, default: 5 },
    content: { type: String, default: '这家伙很懒!' },
    create_at: { type: Date, default: Date.now },
    update_at: { type: Date, default: Date.now },
    deleted: { type: Boolean, default: false },
  });

  return mongoose.model('ExpertEvaluate', ExpertEvaluateSchema);
};
